/*
 * LandmarkNewLocationDialog.java
 *
 * Created on August 22, 2007, 1:12 AM
 *
 * Copyright 2008 David D. Emory
 * 
 * This file is part of Five Points. See <http://www.fpdev.org> for
 * additional information regarding the project.
 * 
 * Five Points is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Five Points is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Five Points.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.fpdev.apps.admin.gui.dialogs;

import org.fpdev.apps.admin.ACEvent;
import org.fpdev.apps.admin.AdminClient;
import org.fpdev.apps.admin.EventTypes;

/**
 *
 * @author demory
 */
public class LandmarkNewLocationDialog extends SelectLocationDialog {

  private String lmName_,  altNames_;

  /** Creates a new instance of LandmarkNewLocationDialog */
  public LandmarkNewLocationDialog(AdminClient av, String lmName, String altNames) {
    super(av);
    lmName_ = lmName;
    altNames_ = altNames;
  }

  protected void okClicked() {
    // push to subclass:
    ACEvent ave = new ACEvent(EventTypes.LOC_INIT_LANDMARK);
    ave.setProperty("name", lmName_);
    ave.setProperty("altnames", altNames_);
    ave.setProperty("loc", name_.getText());
    av_.fireEvent(ave);
  }
}
